<template>
	<view class="doc-body">
		<rich-text :nodes="text"></rich-text>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				text: ''
			}
		},
		onLoad() {
			this.getData();
		},
		methods: {
			getData() {
				this.ajax('login/getDocument', {
					data: {
						id: 2
					},
					success: (res) => {
						this.text = res.msg.text;
					}
				});
			}
		}
	}
</script>

<style>
	.doc-body{width: calc(100% - 40upx);padding: 20upx;}
</style>
